{*if count($group->getErrors())}
	<div class="errors">
		{foreach $group->getErrors() as $error}
			<div class="error">{$error}</div>
		{/foreach}
	</div>
{/if*}
<form action="?module=users&action=group_save" method="POST">
	<input type="hidden" id="group_id" name="group[id]" value="{$group->id}" />
	<div class="collumns">
		<div class="collumn_2">
			<div class="row">
				<label for="group_title">Название</label>
				<input type="text" id="group_title" name="group[title]" value="{$group->title}" />
			</div>
			<div class="row">
				<label for="group_description">Описание</label>
				<textarea id="group_description" name="group[description]" cols="30" rows="10" class="redactor">{/strip}{$group->description}{strip}</textarea>
			</div>
		</div>

		<div class="collumn_2">
			<table class="list">
				<tr>
					<th>Название</th>
					<th>Описание</th>
					<th class="_20" style="white-space: nowrap">Вкл./Выкл.</th>
				</tr>
				{foreach $roles as $role}
					<tr>
						<td>{$role->title}</td>
						<td>{$role->description}</td>
						<td class="center"><input type="checkbox"{if $group->role($role->id)} checked="checked"{/if} id="roles_{$role->id}" name="roles[{$role->id}]" value="1" /></td>
					</tr>
				{/foreach}
			</table>
		</div>
	</div>
	<div class="buttons">
		<input type="submit" value="Сохранить" class="save"/>
		<input type="submit" value="Применить" class="apply" name="apply"/>
		<input type="reset" value="Отменить" class="cancel" onclick="history.go(-1)"/>
	</div>
</form>